Socket technology, as one of the most fundamental technologies of computer networking, has been employed for roughly two decades. A socket represents a single bidirectional connection between two pieces of software or applications, which allows either side of the connection to send and receive data. Usually socket-based software runs on two separate computers over a network, although sockets can also be used to communicate locally within a single computer, i.e., inter-process communications. The implementation of sockets can be based on standard mechanisms built into network hardware and operating systems, such as code libraries packaged with the operating system. Several libraries exist for implementing socket Application Programmable Interfaces (APIs), among which the first mainstream socket library is called the Berkeley Sockets API. These code libraries provide various functions for creating and using sockets. For example, socket ( ) is used to create a new socket of a certain socket type, connect ( ) is used to assign a free local port number to a socket, and the functions of send ( ) and receive ( ) are used for sending and receiving data to/from a remote socket.
Socket interfaces can be divided into three categories. The most commonly-used type, stream socket, implements connection-oriented semantics. Essentially, a “stream” requires that the two communicating parties first establish a socket connection, after which any data passed through that connection will be guaranteed to arrive in the same order in which it was sent. In comparison, the second type, datagram socket, offers connection-less semantics. With datagrams, connections are implicit rather than explicit as with streams. Either party simply sends datagrams as needed and waits for the other to respond. This means, messages can be lost in transmission or received out of order, and the socket is not configured to address these problems. In general, datagram sockets provide more flexibility as compared to stream sockets. The third type of socket is called raw sockets, which bypasses the built-in support for standard protocols such as Transmission Control Protocol (TCP) and User Datagram Protocol (UDP). Raw sockets are often used for custom low-level protocol development.
Today, sockets are typically used in conjunction with various Internet protocols, including Internet Protocol (IP), TCP and UDP. The combined use of sockets and TCP may be ideal for unreliable wide area networks, but in a semi-reliable local area network, such as the enhanced Ethernet with growing popularity in enterprise data centers, there are quite a few disadvantages due to certain specific algorithms under TCP. For instance, TCP uses a slow start algorithm to avoid congestion when data transmission is started. However, this can be unnecessary in the context of the enhanced Ethernet that already provides congestion management. Also, certain applications require high bandwidths for data transfer or involve frequent stops and starts in data transmission (e.g., file system or disk storage protocols). The use of slow start algorithm under TCP may compromise or even conflict these requirements. Similarly, the congestion avoidance algorithm in TCP may be unnecessary in view of the congestion management provided in the enhanced Ethernet protocol. As another example, TCP allows data packets to be received out of order, which typically occurs when some packets are being dropped due to network congestion or packet reordering in the network. According to the TCP protocol, the out-of-order packets would be buffered and put back in order when the dropped packets are resent and received. This may create significant complexity and memory overhead in Network Interface Cards (NICs) in support of TCP operations. In contrast, in the enhanced Ethernet, out-of-order packets are simply dropped, thereby avoiding any buffering and the associated overhead.
In view of the above, there is a need for an improved method of using sockets in connection with TCP over certain local networks, such as the enhanced Ethernet, to ensure efficient data transfer and communications within the network.